<?php
//废弃，可以删
namespace app\api\controller;
use think\Db;

class Softdog //extends Base
{
    public function detail()
    {
        try {
            //加密狗的状态获取
            $dog_result = DB::name('soft_dog')->where('id', '=', 1)->find();

            $dog_result = [
                //密钥ID
                'keyId' => $dog_result['key'],
                //当前加密狗设备名
                'productName' => $dog_result['name'],
                //接口版本
                'version' => $dog_result['brand'],
                //授权时间
                'authorized_time' => '永久授权',
                //通道数
                'channel' => $dog_result['channel'],
                //时间
                'time' => date("Y-m-d, H:i:s", $dog_result['update_time']),
            ];

            return resultArray(['data' => $dog_result]);
        } catch (\Exception $e) { }
    }
}
